home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
gtlayout-source.lha
/
LTP_DrawIncrementer.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-25
|
652b
|
39 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
VOID __regargs
LTP_DrawIncrementer(struct RastPort *rp,BOOLEAN leftDirection,LONG left,LONG top,LONG width,LONG height)
{
LONG middle;
LONG x0,x1;
LONG stop;
middle = height / 2;
if(leftDirection)
{
x0 = left + 2;
x1 = left + width - 3;
}
else
{
x0 = left + width - 3;
x1 = left + 2;
}
if(height > width)
stop = (width - 4) / 2;
else
stop = (height - 4) / 2;
Move(rp,x0,top + middle);
Draw(rp,x1,top + middle - stop);
Move(rp,x0,top + middle);
Draw(rp,x1,top + middle + stop);
}